import 'package:flutter/material.dart';

class NavCol extends StatefulWidget {
  const NavCol(
      {super.key, required this.icon, required this.title, this.onNavClick});

  final String icon;
  final String title;
  final Function? onNavClick;

  @override
  State<NavCol> createState() => _NavColState();
}

class _NavColState extends State<NavCol> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
        onTap: () {
          // widget.onNavClick!();
          widget.onNavClick?.call();
        },
        child: Expanded(
            child: Column(
          children: [
            Image.asset(
              widget.icon,
              width: 35,
              height: 35,
            ),
            const SizedBox(
              height: 5,
            ),
            Text(widget.title)
          ],
        )));
  }
}
